test: raise encoder/decoder coverage (10 lowest-coverage classes)#115
Merged
Conversation
Was 46% line coverage with no dedicated test. Adds round-trips for I8/I16/I32/I64 (incl. MIN/MAX bounds), the single-value broadcast path per width, accepts/encodingId, and the non-primitive-dtype throw. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 61% line coverage. Adds accepts, encode round-trips for I8/I16/I32/U16/U64/F32 (covering the byte/short/int readLong branches and the unsigned buildIntScalar branch), empty + single-element cases, and non-arithmetic throws for F32/F64/F16. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 36% line coverage — only the primitive arm of the proto-to-core DType translation was exercised. Adds a DtypeFromProto nested class covering null/bool/decimal/utf8/binary/struct/list/fixed_size_list/ extension (with and without metadata bytes)/variant, plus the unsupported-empty-proto throw. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 60% line coverage — only the I32/I64 encode arms were exercised. Adds I8 and I16 round-trips (incl. MIN/MAX bounds and empty), plus encodingId and accepts (signed true; unsigned/non-primitive false). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 63% line coverage with no writer-side test. Covers extensionId, dtype factories (default ms/I32, seconds/I32, nanos/I64), encodeAll for all four valid units (int[] for s/ms, long[] for us/ns), nullable null handling (NullableData + zero placeholder), the non-nullable null throw, and the Days-unit rejection guard. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 63% line coverage — the encoder round-trip tests only drive the Utf8 happy path. Adds encodingId, accepts, the Binary-dtype inline-view decode, and both guard throws (wrong dtype, zero buffers). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 66% line coverage — the encoder round-trips only drive I64 offsets and never hit the constant-offset broadcast path. Adds an I32 offsets happy path and the single-offset broadcast-copy case (capacity < n+1). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 66% line coverage — the encoder round-trips only drive the dense U32-indexed paths. Adds accepts, the non-primitive-dtype throw, the missing-metadata zero-exponent fallback, f64/f32 constant-broadcast (capacity < n, no patches), a U8 patch-index decode (readUnsigned U8 arm), and the non-unsigned patch-index-ptype rejection. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Was 67% line coverage — encoder round-trips only drive non-null ms/ns/us timestamps. Adds encodingId, missing-metadata throw, the Days-unit special case (unitsPerSecond=1), the nullable-extension days child, the extension-missing-TimeUnit throw, and the non-Extension-dtype throw. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The encoder property test drives the dense ptype/size matrix but always emits metadata and full-length children. Adds the meta==null empty-array fallback (every integer ptype) and the readLongs broadcast path where bases/deltas children hold a single constant value (capacity < count). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Arena.global() never frees; ofAuto() is GC-backed and matches the VarBinView test in the same series. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds tests for the ten lowest-coverage encoder/decoder classes (per SonarCloud, encode/decode files only), one file per commit, climbing from lowest coverage. Test-only — no production code changed.
ZigZagEncodingDecoderSequenceEncodingEncoderVariantEncodingDecoderdtypeFromProtoarm (null/bool/decimal/utf8/binary/struct/list/fsl/extension/variant + unsupported throw)ZigZagEncodingEncoderTimeExtensionEncoderVarBinViewEncodingDecoderVarBinEncodingDecoderAlpEncodingDecoderDateTimePartsEncodingDecoderDeltaEncodingDecoder"Was" figures are from a stale SonarCloud snapshot; the real gaps were verified against current source.
Defensive unreachable branches (exhaustive-switch
default ->throws, malformed-protoIOExceptioncatches) left untested per the repo's simplify-first rule — not worth unkillable tests.Full
reader+writersuite green: 1569 tests, 0 failures.🤖 Generated with Claude Code